export default function TaskList(props) {
  const { list } = props;
  return (
    <div className="list">
      {list.map((item) => (
        <div key={item.id} className="item">
          <input type="checkbox" defaultChecked={item.done} />
          <div className="flex1">{item.title}</div>
          <div>
            <button>Edit</button>
            <button>Delete</button>
          </div>
        </div>
      ))}
    </div>
  );
}
